package com.aaa.controller;

import com.aaa.service.DeptService;
import com.aaa.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptService deptService;
    @RequestMapping("/list")
    @ResponseBody
    public R list() {
        return deptService.findAll();
    }
}
